<template>
  <el-dialog :title="title" :visible="visible" :width="width" :before-close="close" :append-to-body="true">
    <slot></slot>
    <template slot="footer">
      <slot name="footer"></slot>
    </template>
  </el-dialog>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ""
    },
    visible: {
      type: Boolean,
      default: false
    },
    width: {
      type: String,
      default: "30%"
    }
  },
  methods: {
    close() {
      this.$emit("close");
    }
  }
}
</script>

<style scoped>
  
</style>